feat(WhereUI): merge continuous planned Timeline stays - #307
Merged
Conversation
kyleve
commented
Sep 4, 2026
| : nil | ||
| let joinsPlannedStay = if let plannedInterval, let currentStint = stints.last { | ||
| plannedInterval.region == currentStint.region | ||
| && CalendarDay(from: currentStint.end, in: report.calendar).adding(days: 1) |
Owner
Author
There was a problem hiding this comment.
Posted by an AI agent on kve's behalf.
Review focus: the visual join is deliberately stricter than region equality. Converting the recorded Date through the injected Gregorian calendar and requiring its next CalendarDay to equal the planned start prevents an unrecorded gap from appearing as one continuous stay; the new PlannedStayAfterRecordingGap snapshots pin the fallback.
kyleve
enabled auto-merge (squash)
September 4, 2026 23:48
kyleve
disabled auto-merge
September 4, 2026 23:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
The Timeline previously rendered a planned continuation as a separate rounded card even when it began the day after the current stint in the same region. Giving both joined sections the same full-row minimum also made a short plan look disproportionately large beside the current stay. The compact planned footer makes the continuous stay read as one unit and reduces that minimum-height distortion without making short-plan text unusably small. The trailing estimate panel adds Calendar's forecast context without interrupting that chronological flow.
Review focus
Testing
./swiftformat --lint./test WhereUITests— 485 tests passed./test --snapshots --no-generate --no-build --only 'WhereUISnapshotTests/PresenceTimelineListSnapshotTests' --review— 1 snapshot test passed; 15 architecture rule tests passed